Techniques for data assignment from an external distributed file system to a database management system

ABSTRACT

Techniques for data assignment from an external distributed file system (DFS) to a database management system (DBMS) are provided. Data blocks from the DFS are represented as first nodes and access module processors of the DBMS are represented as second nodes. A graph is produced with the first and second nodes. Assignments are made for the first nodes to the second nodes based on evaluation of the graph to integrate the DFS with the DBMS.

BACKGROUND

After over two-decades of electronic data automation and the improvedability for capturing data from a variety of communication channels andmedia, even the smallest of enterprises find that the enterprise isprocessing terabytes of data with regularity. Moreover, mining,analysis, and processing of that data have become extremely complex. Theaverage consumer expects electronic transactions to occur flawlessly andwith near instant speed. The enterprise that cannot meet expectations ofthe consumer is quickly out of business in today's highly competitiveenvironment.

Consumers have a plethora of choices for nearly every product andservice, and enterprises can be created and up-and-running in theindustry it mere days. The competition and the expectations arebreathtaking from what existed just a few short years ago.

The industry infrastructure and applications have generally answered thecall providing virtualized data centers that give an enterprise anever-present data center to run and process the enterprise's data.Applications and hardware to support an enterprise can be outsourced andavailable to the enterprise twenty-four hours a day, seven days a week,and three hundred sixty-five days a year.

As a result, the most important asset of the enterprise has become itsdata. That is, information gathered about the enterprise's customers,competitors, products, services, financials, business processes,business assets, personnel, service providers, transactions, and thelike.

Updating, mining, analyzing, reporting, and accessing the enterpriseinformation can still become problematic because of the sheer volume ofthis information and because often the information is dispersed over avariety of different file systems, databases, and applications.

In response, the industry has recently embraced a data platform referredto as Apache Hadoop™ (Hadoop™). Hadoop™ is an Open Source softwarearchitecture that supports data-intensive distributed applications. Itenables applications to work with thousands of network nodes andpetabytes (1000 terabytes) of data. Hadoop™ provides interoperabilitybetween disparate file systems, fault tolerance, and High Availability(HA) for data processing. The architecture is modular and expandablewith the whole database development community supporting, enhancing, anddynamically growing the platform.

However, because of Hadoop's™ success in the industry, enterprises nowhave or depend on a large volume of their data, which is stored externalto their core in-house database management system (DBMS). This data canbe in a variety of formats and types, such as: web logs; call detailswith customers; sensor data, Radio Frequency Identification (RFID) data;historical data maintained for government or industry compliancereasons; and the like. Enterprises have embraced Hadoop™ for data typessuch as the above referenced because Hadoop™ is scalable, costefficient, and reliable.

One challenge in integrating Hadoop™ architecture with an enterpriseDBMS is efficiently assigning data blocks and managing workloads betweennodes. That is, even when the same hardware platform is used to deploysome aspects of Hadoop and a DBMS the resulting performance of such ahybrid system can be poor because of how the data is distributed and howworkloads are processed.

SUMMARY

In various embodiments, techniques for data assignment from an externaldistributed file system (DFS) to a DBMS are presented. According to anembodiment, a method for data assignment from an external DFS to a DBMSis provided.

Specifically, an initial assignment for first nodes to second nodes isreceived in a bipartite graph. The first nodes represent data blocks inan external distributed file system and the second nodes representaccess module processors of a database management system (DBMS). Aresidual graph is constructed with a negative cycle having the initialassignment. The residual graph is processed through iterations, witheach of which the initial assignment is adjusted to eliminate negativecycles. Finally, a final assignment is achieved by removing all negativecycles of the residual graph, for each of the data blocks to one of theaccess module processors as an assignment flow.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram depicting an even assignment of data from a HDFS toa parallel DBMS, according to an example embodiment.

FIG. 2 is a diagram showing a bipartite graph for the example presentedin the FIG. 1, according to an example embodiment.

FIG. 3 is a diagram illustrating an even assignment with minimal cost asshown in the FIG. 2, according to an example embodiment.

FIG. 4 is a diagram illustrating an assignment of a block of data usingan Approximate-Greedy Algorithm, according to an example embodiment.

FIG. 5 is a diagram of a method for data assignment to an external DFSto a DMBS, according to an example embodiment.

FIG. 6 is a diagram of another method for data assignment to an externalDFS to a DMBS, according to an example embodiment.

FIG. 7 is a diagram of yet? method for data assignment to an externalDFS to a DMBS, according to an example embodiment.

DETAILED DESCRIPTION

Initially for purposes of illustration and comprehension some contextand examples are presented to highlight and illustrate the techniquesbeing presented herein and below.

When a parallel DBMS and Hadoop™ Distributed File System (DFS) aredeployed on the same node sharing processors and memory, local data canbe transferred from the Hadoop™ DFS to the parallel in a highlyefficient way. The network can be a bottleneck however, if Access ModuleProcessors (AMPs) have to read a large scale amount of data stored fromremote nodes. On the other hand, each AMP can be assigned nearly thesame amount of workload when the parallelism is concerned, especiallywhen the HDFS (Hadoop™ DFS) data are distributed across a cluster.Usually in the cluster, each DBMS node is configured with the samenumber of AMPs and all AMPs have the same performance. For purposes ofillustration, it is assumed that each node has exactly one AMP in thedescriptions that follow.

Also, as used herein the terms, “node” and “AMP” may be usedsynonymously interchangeably with one another.

Given a set of M nodes (one AMP per node) and a set of N data blocksB={B_1, B_2, . . . , B_N}, each block has K copies on K different nodes.Formally, an assignment of N blocks to M AMPs, is denoted as a set,A′={A_1, A_2, . . . , A_M}, such that the following requirements aresatisfied:

-   -   A_i is a set of blocks {B_i1, B_i2 . . . } assigned to AMP i;    -   All blocks should be assigned,

${{\underset{i = 1}{\bigcup\limits^{M}}{A\_ i}} = B};$

-   -    and    -   Each block can be assigned only once, A_i∩A_j=φ.

In an assignment, a data block, B_ij is called a local assignment to A_iif it has a copy in the node where AMP i is. Otherwise, B_ij is a remoteassignment to A_i, which causes data transferring through network.Correspondingly, a cost(A′) is used to measure the number of remoteassignments occurring to A′.

Furthermore, an “even assignment” is defined as an assignment, which has∥A_i|−|A_j∥<2 for any A_i and A_j. In other words, an even assignmentgives each AMP almost the same amount of workload. Conceivably, multipleeven assignments can exist when assigning N blocks to M AMPs, but theirremote assignments may not be the same. The goal is to achieve one ofthe even assignments with the minimal cost(A′).

Remote costs can be huge if a naïve approach is employed. For instance,if a module operator is used to decide the assignment of each block,then B_i is assigned as AMP k (=i mod M). So, a cost of module approachcan be up to one third of the total using the approach visuallyillustrated in the FIG. 1.

The problem of finding an even assignment with the minimal cost can besolved in the framework of network theory. Specifically, a bipartitenetwork G=(s, t, V_1, V_2, E) can be used to describe the assignmentproblem.

-   -   i. Two sets of vertices V_1 and V_2 represent the data blocks        and AMPs respectively, thus v_i in V_1 (or V_2) denotes block        B_i (or AMP i).    -   ii. An edge directs from v_i in V_1 to v_j in V_2.        -   1. The associated cost is 0 if block B_i has a copy on the            node where AMP j is; otherwise, the cost is 1.        -   2. The associated capacity ranges from 0 to 1.    -   iii. There is no an edge between any pair of vertices in V_1 (or        in V_2).    -   iv. Vertices s and t are newly introduced as the source and        target of the network correspondingly, such that source s has an        edge reaching all vertices in V_1, and all vertices in V_2        connect with target t.        -   1. The cost associated with these edges is 0.        -   2. The edge starting from s has the capacity exactly as 1,            for all blocks should be assigned.        -   3. The edge ending at t has the capacity from

${\lfloor \frac{N}{M} \rfloor \mspace{14mu} {to}\mspace{14mu} \lceil \frac{N}{M} \rceil}\mspace{11mu},$

-   -   -    because of the even-assignment requirement, where N=|V_1|            and M=|V_2|.

The example shown in the FIG. 1 is modeled as a bipartite network in theFIG. 2.

The assignment problem can be converted into the problem of finding themin-cost flow in the bipartite network G=(s, t, V_1, V_2, E).Traditionally, cycle-canceling algorithm is one of the most popularalgorithms for solving the min-cost flow problem. The cycle-cancelingalgorithm improves a feasible solution (i.e., an assignment) by sendingaugmenting flows along directed cycles with negative cost (callednegative cycles). Specifically, it searches for the negative cyclesexisting in the residual graph of the feasible solution, and adjusts theflow along the negative cycles to reduce flow cost. Adjusting flowsalong the negative cycles does not change the total flow capacity,because there is not any external flow introduced; the block assignmentis improved correspondingly.

The algorithm can be described as:

1) Initialize the algorithm with a feasible solution f; 2) Construct theresidual graph G' from f; 3) While G' contains a negative cycle: 4) Adjust the feasible solution f by the negative cycle; and 5) Return theflow as an optimal solution.

The dash lines in the FIG. 3 display a min-cost flow for the networkdefined in FIG. 3. Those connecting vertices in V_1 with that in V_2give the same assignment as FIG. 2.

According to Algorithm 1, the complexity of cycle-canceling algorithm iscomposed of two parts: the cost of finding a feasible solution and thepart of improving the feasible solution for a min-cost network flow. Thefocus here is on the second part, because the cost of finding a feasiblesolution can be relatively much cheaper (i.e., O(N)). Finding a negativecycle in the bipartite network G=(s, t, V_1, V_2, E), has a complexityof O(M²N), whereas there exist at most N negative cycles. Therefore thecomplexity of the algorithm can be described as O(M²N²).

Approximate the Solution with Less Time Cost

The idea of converting the assignment problem into a min-cost flowproblem and using cycle-canceling to obtain the optimal solution, iscost effective to implement. However, the complexity of the algorithm isnot always satisfying. For instance, it can take over 10 seconds toassign 3565 blocks to 100 AMPs when a MacBook® Pro with 2.4 GHz Intel®Core 2 Duo CPU and 4 GB DDR3 memory is used for the execution.

In some cases, a number of remote block transferring can be allowed tocomplete the assignment with less time cost, as long as the evenassignment is guaranteed. Therefore, approximation approaches areachievable. One such approach is now presented as an “Approximate-GreedyAlgorithm” (AGA) to solve the even-assignment problem. The AGA obtainsan even assignment much faster than the cycle-canceling algorithmusually, but its cost may not be minimal.

The basic idea of the algorithm is to assign a block to AMPs having itscopies, otherwise to an AMP with minimum assignments so far. It can bedescribed as Algorithm 2 below:

1. For each block B_(i); 2. FOR each AMP A_(j) containing a replica ofB_(i); 3. IF A_(j) is not saturated and A_(j) has the minimum load: 4.  Assign B_(i) to A_(j), and continue to Step 1; 5. FOR each AMP A_(j)containing a replica B_(i): 6.  FOR each block B_(i) assign to A_(j): 7.  FOR each AMP A_(g) containing a replica of B_(i); 8.    IF Ag is notsaturated and A_(g) has the minimum load: 9.     Re-assign B_(i) fromA_(j) to A_(g); 10.     Assign Bi to A_(j), and continue to Step 1; and11. Assign B_(i) remotely to an AMP with minimum load.

The loop from line 2 to line 4 tries to assign a block (e.g., B_i) to anAMP with its local copies, if possible. If all AMPs having B_i aresaturated, the blocks that have been assigned to those AMPs areconsidered for re-assignment: if one of these blocks can be assigned toany other AMP having its copies, it is moved to that AMP and at the sametime B_i takes its place. But when re-assignment is impossible, B_i isassigned to an AMP with minimum assigned blocks currently, as a remoteassignment.

The instinct behind the AGA is that the probability of finding are-assignment is very high when the number of blocks (i.e., N) is farlarger than that of AMPs (i.e., M). This can be explained by the diagrampresented in the FIG. 4.

To assign block B_0, the AMPs (A_0, A_1, . . . , A_k at the secondlevel) are first considered to see if they have its local copies. If allthese AMPs are saturated,

$\frac{NK}{M}$

blocks (B′_0, B′_1, . . . , B′_l at the third level, where

$ {l = \frac{NK}{M}} )$

are checked for re-assignment. Then, the AMPs (A′_0, A′_1, . . . , A′_gat the fourth level) having their local copies must be considered.Assume that all blocks including their copies are randomly distributedacross AMPs initially; the probability that the value of ‘g’ being equalto M can be close to 1 in most cases.

The complexity of the AGA is also composed of two parts: the first

$\frac{NK}{M}$

blocks can always be assigned locally in

${O( \frac{{NK}^{2}}{M} )},$

and in the worst case all other blocks are considered for re-assignmentin

${O( {( {N - \frac{NK}{M}} )( {K + \frac{{NK}^{2}}{M} + M - K} )} )}.$

Thus, the overall complexity of the AGA is:

${O( {( {N - \frac{NK}{M}} )( {\frac{{NK}^{2}}{M} + M} )} )}.$

Modeling the assignment problem as the min-cost network flow problemmakes it possible to apply existing efficient algorithms. Adapting theexisting cycle-canceling approach, a negative cycle-canceling algorithmis proposed, which is cost-effective to implement and can achieve theoptimal solution in polynomial time. Furthermore, the approximation isused as an alternative, when a number of remote data transferring isallowed to obtain a rather good solution within much lower time cost.Moreover, the AGA is simple to implement and is effective enough whenthe number of blocks is far more than that of AMPs.

With the above detail of the techniques presented, various embodimentsare now presented with the discussion of the FIGS. 5-7.

FIG. 5 is a diagram of a method for data assignment to an external DFSto a DMBS, according to an example embodiment. The method 500(hereinafter “data assignment manager”) is implemented as instructionswithin a non-transitory computer-readable storage medium that execute onone or more processors, and the processors are specifically configuredto execute the data assignment manager. Moreover, the data assignmentmanager is programmed within a non-transitory computer-readable storagemedium. The data assignment manager is also operational over a network;the network is wired, wireless, or a combination of wired and wireless.

The data assignment manager presents another and in some ways anenhanced processing perspective to what was discussed and shown abovewith respect to the FIGS. 1-4.

At 510, the data assignment manager receives an initial assignment offirst nodes to second nodes in a bipartite graph, such as the bipartitegraph shown above with respect to the FIG. 2. The first nodesrepresenting data blocks in an external distributed file system, such asa HDFS, and the second nodes representing AMPs of a parallel DBMS.

According to an embodiment, at 511, the data assignment managerorganizes the first nodes and the second nodes in the bipartite graph.

Continuing with the embodiment of 511 and at 512, the data assignmentmanager weights each edge of the bipartite graph.

At 520, the data assignment manager constructs a residual graph with anegative cycle having an initial assignment. That is, the processassociated with constructing the graph is given an initial assignmentwith a negative cycle.

At 530, the data assignment manager iterates the residual graph suchthat with each iteration the initial assignment is adjusted to eliminatenegative cycles of the residual graph. Finally, there is no negativecycles present in the residual graph. This situation was discussed abovewith reference to the FIG. 3.

In an embodiment, at 531, the data assignment manager ensures that eachdata block is assigned to a single specific access module processor ineach iteration of the residual graph.

At 540, the data assignment manager returns a final assignment for eachof the data blocks to one of the AMPs as an assignment flow. In otherwords, the graph includes assignments for each data block to a specificAMP.

In an embodiment, at 550, the data assignment manager populates the datablocks to the AMPs in accordance with the final assignment.

In a scenario, at 560, the data assignment manager integrates thedistributed file system with the DBMS via the data blocks on theassigned AMPs.

FIG. 6 is a diagram of another method 600 for data assignment to anexternal DFS to a DMBS, according to an example embodiment. The method600 (hereinafter “workload assignment manager”) is implemented asinstructions within a non-transitory computer-readable storage mediumthat execute on one or more processors, and the processors arespecifically configured to execute the workload assignment. Moreover,the workload assignment manager is programmed within a non-transitorycomputer-readable storage medium. The workload assignment manager isalso operational over a network; the network is wired, wireless, or acombination of wired and wireless.

The workload assignment manager presents yet another view of theprocessing discussed above with respect to the FIGS. 1-5.

At 610, the workload assignment manager obtains data blocks for anexternal distributed file system.

According to an embodiment, at 611, the workload assignment managergenerates a source node and a target node for organizing the graph.

Continuing with the embodiment of 611 and at 612, the workloadassignment manager ensures that the source node includes first edgeconnections to each of the first nodes of the first set of nodes.

Still continuing with the embodiment of 612 and at 613, the workloadassignment manager ensures that the target node includes second edgeconnections to each of the second nodes in the second set of nodes.

Continuing with the embodiment of 613 and at 614, the workloadassignment manager assigns costs to each edge connection for each firstnode from the first set of nodes to each second node from the second setof nodes.

Still continuing with the embodiment of 614 and at 615, the workloadassignment manager increases the cost for a particular edge between aparticular first node and a particular second node when the particularsecond node already includes an existing edge connection to theparticular first node. This was discussed in detail above with referenceto the FIGS. 1-3.

At 620, the workload assignment manager acquires AMPs for a DBMS.

At 630, the workload assignment manager organizes a first set of nodesto represent the data blocks and a second set of nodes as the AMPswithin a bipartite graph.

At 640, the workload assignment manager uses the first set of nodes andthe second set of nodes to produce a minimum cost graph with each of thefirst set of nodes assigned to a specific one of the second nodes in thesecond set of nodes.

According to an embodiment at 641, the workload assignment managerprocesses a cycle-canceling algorithm to produce the minimum cost graph.

Continuing with the embodiment of 641 and at 642, the workloadassignment manager initiates the cycle-canceling algorithm with aninitial negative cycle and initial assignment of the first nodes to thesecond nodes.

At 650, the workload assignment manager provides the minimum cost graphas a final assignment for the first set of nodes mapped to the secondset of nodes.

FIG. 7 is a diagram of yet method 700 for data assignment to an externalDFS to a DMBS, according to an example embodiment. The method 700(hereinafter “block assignment manager”) is implemented as instructionswithin a non-transitory computer-readable storage medium that execute onone or more processors, the processors specifically configured toexecute the block assignment manager. Moreover, the block assignmentmanager is programmed within a non-transitory computer-readable storagemedium. The block assignment manager is also operational over a network;the network is wired, wireless, or a combination of wired and wireless.

The block assignment manager presents another perspective and someaspects enhancements to the processing show above with respect to theFIGS. 1-6.

At 710, the block assignment manager generates a graph having a sourcenode, first nodes, second nodes, and a target node.

At 720, the block assignment manager represents each first node as ablock of data from an external file system, such as HDFS, and eachsecond node as an AMP on a parallel DBMS.

At 730, the block assignment manager processes an approximate-greedyalgorithm on the source node, the first nodes, the second nodes, and thetarget node to produce a modified graph having assignments between thefirst nodes and the second nodes. This was described above withreference to the FIG. 4.

According to an embodiment, at 731, the block assignment manager selectsthe approximate-greedy algorithm when the total number of the datablocks is greater than the total number of AMPs by a predeterminedthreshold value.

In a scenario, at 732, the block assignment manager permits specificdata blocks to be assigned to specific AMPs that already have copies ofthose specific data blocks.

In another case, at 733, the block assignment manager configures aminimum load for each AMP before initiating the approximate-greedyalgorithm.

At 740, the block assignment manager returns a pointer to the modifiedgraph.

According to an embodiment, at 750, the block assignment managerpopulates the AMPs with specific databases for the external file system,which are identified by edge connections in the modified graph.

The above description is illustrative, and not restrictive. Many otherembodiments will be apparent to those of skill in the art upon reviewingthe above description. The scope of embodiments should therefore bedetermined with reference to the appended claims, along with the fullscope of equivalents to which such claims are entitled.

1. A method implemented and programmed within a non-transitorycomputer-readable storage medium and processed by one or moreprocessors, the processors configured to execute the method, comprising:receiving an initial assignment of first nodes to second nodes in agraph, the first nodes representing data blocks in an externaldistributed file system and the second nodes representing access moduleprocessors of a database management system (DBMS); constructing aresidual graph with a negative cycle having an initial assignment;iterating the residual graph and with each iteration adjusting theinitial assignment by any present negative cycle for the residual graphuntil there are no negative cycles present in the residual graph; andreturning a final assignment for each of the data blocks to one of theaccess module processors as an assignment flow.
 2. The method of claim 1further comprising, populating the data blocks to the access modulesprocessors in accordance with the final assignment.
 3. The method ofclaim 1 further comprising, integrating the external distributed filesystem with the DBMS via the data blocks on the access moduleprocessors.
 4. The method of claim 1, wherein receiving further includesorganizing the first and second nodes in a bipartite graph;
 5. Themethod of claim 4, wherein organizing further includes weighting eachedge of the bipartite graph.
 6. The method of claim 1, wherein iteratingfurther includes ensuring that each data block is assigned to a singlespecific access module processor in each iteration of the residualgraph.
 7. The method of claim 1, wherein returning further includesproducing a minimum cost residual graph having the final assignment. 8.A method implemented and programmed within a non-transitorycomputer-readable storage medium and processed by one or moreprocessors, the processors configured to execute the method, comprising:obtaining data blocks for an external distributed file system; acquiringaccess module processors for a database management system (DBMS);organizing a first set of nodes to represent the data blocks and asecond set of nodes as the access module processors within a bipartitegraph; using the first set of nodes and the second set of nodes toproduce a minimum cost bipartite graph with each of the first set ofnodes assigned to a specific one of the second nodes in the second setof nodes; and providing the minimum cost bipartite graph as a finalassignment for the first set of nodes mapped to the second set of nodes.9. The method of claim 8, wherein organizing further includes generatinga source and a target node for organizing the bipartite graph.
 10. Themethod of claim 9, wherein generating further includes ensuring that thesource node includes first edge connections to each of the first nodesof the first set of nodes.
 11. The method of claim 10, wherein ensuringfurther includes ensuring that the target node includes second edgeconnections to each of the second nodes in the second set of nodes. 12.The method of claim 11, wherein generating further includes assigningcosts to each edge connection for each first node from the first set ofnodes to each second node of the second set of node.
 13. The method ofclaim 12, wherein assigning further includes increasing the cost for aparticular edge between a particular first node and a particular secondnode when the particular second node already includes an existing edgeconnection to the particular first node.
 14. The method of claim 8,wherein using further includes processing a cycle-canceling algorithm toproduce the minimum cost bipartite graph.
 15. The method of claim 14,wherein processing further includes initiating the cycle-cancelingalgorithm with an initial negative cycle and initial assignment of thefirst nodes to the second nodes.
 16. A method implemented and programmedwithin a non-transitory computer-readable storage medium and processedby one or more processors, the processors configured to execute themethod, comprising: generating a graph having a source node, firstnodes, second nodes, and a target node; representing each first node asa block of data from an external file system and each second node as anaccess module processor on a database management system; processing anapproximate-greedy algorithm on the source node, the first nodes, thesecond nodes, and the target node to produce a modified graph havingassignments between the first nodes and the second nodes; and returninga pointer to the graph.
 17. The method of claim 16 further comprisingpopulating the access module processors with specific data blocks fromthe external file system identified by edge connections in the modifiedgraph.
 18. The method of claim 16, wherein processing further includesselecting the approximate-greedy algorithm when on a total number of thedata blocks is greater than a total number of access module processorsby a predefined threshold value.
 19. The method of claim 16, whereinprocessing further includes permitting specific data blocks to beassigned to specific access module processors that already have copiesof those specific data blocks.
 20. The method of claim 16, whereinprocessing further includes configuring a minimum load for each accessmodule processor before initiating the approximate-greedy algorithm.